package org.example.properties;

import org.springframework.beans.factory.annotation.Value;

import java.util.Properties;

public class AppProperties {

    public static String appName;
    public static String jdbcUrl;

    public AppProperties() {
    }

    @Value("${app.name}")
    public void setAppName(String appName) {
        AppProperties.appName = appName;
    }

    @Value("${jdbc.url}")
    public void setJdbcUrl(String jdbcUrl) {
        AppProperties.jdbcUrl = jdbcUrl;
    }

    private Properties properties;

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    @Override
    public String toString() {
        return "AppProperties{" +
                "properties=" + properties +
                '}';
    }
}
